package br.com.marcelo.reservasis.domain.model;

import br.com.aroeirasoftware.gwtcomponents.domain.models.ASBaseEntity;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 *
 * @author Kirmaier
 */
@Entity
@Table(name = "UF")
//@NamedQueries({@NamedQuery(name = "Uf.findAll", query = "SELECT u FROM Uf u"), @NamedQuery(name = "Uf.findByIduf", query = "SELECT u FROM Uf u WHERE u.iduf = :iduf"), @NamedQuery(name = "Uf.findByNome", query = "SELECT u FROM Uf u WHERE u.nome = :nome")})
public class Uf extends ASBaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "Id_uf")
    private Integer iduf;
    @Column(name = "Nome")
    private String nome;

    public Uf() {
    }

    public Uf(Integer iduf) {
        this.iduf = iduf;
    }

    public Integer getIduf() {
        return iduf;
    }

    public void setIduf(Integer iduf) {
        this.iduf = iduf;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (iduf != null ? iduf.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Uf)) {
            return false;
        }
        Uf other = (Uf) object;
        if ((this.iduf == null && other.iduf != null) || (this.iduf != null && !this.iduf.equals(other.iduf))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.reservasis.Uf[iduf=" + iduf + "]";
    }

}
